﻿/*********************************************************/
/*   Loading 0.3                                         */
/*   Usage: $.loading(true) to show loading screen or    */
/*   $.loading(false) to hide.                           */
/*********************************************************/

$(document).ready(function () {

    jQuery.loading = function (status) {

        if ($('#loading').html() == null) {
            var html = '<div id="loading" style="display:none;"><div class="modal"><img src="/img/carregando.gif" /></div></div>';
            $('form').after(html);
        }

        $('#loading').toggle(status);

    };

});